package com.atguigu.gulimall.seckill.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Copyright (c) 2019-2029 星大陆 All Rights Reserved
 * <p>
 * Project: gulimall
 * Package: com.atguigu.gulimall.order.config
 * Version: V 1.0
 * <p>
 * Created by guoxiaolong on 2021/01/17 3:58
 */
@Configuration
public class MyRabbitConfig {

    /**
     * 使用 JSON 序列化机制，进行消息转换
     *
     * @return
     */
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}
